#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <conio.h>
#include <time.h>

void initrnd(unsigned int y[]){
  int k;
  srand(time(0));
  for(k=1;k<=55;k++)
    y[k]=rand()*rand();
}

int rnd(unsigned int y[]){
   unsigned int m=2147483648U;
   static int j=24,k=55;
   int s;
   y[k]=(y[k]+y[j])%m;
   s=y[k];
   j--; k--;
   if(j==0) j=55;
   if(k==0) k=55;
   return s;
}

int main(void){
   unsigned int a[56],k,s;
   initrnd(a);
   for(k=1;k<=200;k++){
     s=rnd(a);
     printf("%11u",s);
     if(k%7==0) printf("\n"); 
   }
   getch();
}
